<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  <script>
	//步骤1:使用基类实例化学生对象
	var student=new Object();
	//步骤2:使用实例化对象为其属性赋值。
	student.name="zhangsan";
	student.stuNO="202101501";
	student.stuClass="21级计算机应用技术班";
	//步骤3:使用实例化对象添加方法
	student.study=function(){
		document.write( this.name +" "+"正在学习 JavaScript!" +" </br>");
	}
	student.sport =function(){
		document.write(this.name +" "+"学习完后去打篮球!"+"</br>");
	}
	//步骤 4:显示实例化对象的属性值和方法内容。
	document.write("姓名:" +student.name+"</br>" );
	document.write("学号:" +student.stuNO+"</br>" );
	document.write("班级:" +student.stuClass+"</br>" );
	student.study();
	student.sport();
  </script>
 </body>
</html>
